Signed-off-by: Ewan Mellor <ewan@xensource.com>
#
import commands
+import logging
import os
import stat
import threading
XEND_STORAGE_VDICFG_FILENAME = "%s.vdi.xml"
QCOW_CREATE_COMMAND = "/usr/sbin/qcow-create %d %s"
-MB = 1024 *1024
+MB = 1024 * 1024
+
+log = logging.getLogger("xend.XendStorageRepository")
+
class DeviceInvalidError(Exception):
pass
open(uuid_file, 'w').write(new_uuid + '\n')
return new_uuid
except IOError:
- # TODO: log warning
- pass
+ log.exception()
return uuid.createString()
if cfg_path and os.path.exists(cfg_path):
os.unlink(cfg_path)
except OSError:
- # TODO: log warning
- pass
+ log.exception()
del self.images[image_uuid]
return True
finally: